<script type="text/javascript" src="{$apm.baseurl}apm-js/jquery.js"></script>
{literal}
<style TYPE="text/css">
<!--
div.pager_block {
    border-bottom:1px solid #666666;
    border-top:1px solid #666666;
    display:inline-block;
    margin:0 0 15px;
    padding:2px 0 1px;
    width:100%;
}
div.pager_block p.txt {
    float:left;
    font-size:111%;
    font-weight:bold;
    margin:0;
}
#main_block .pager_block p.txt {
    font-size:111%;
    font-weight:bold;
}
#main_block .pager_block p.txt span {
    color:#FF6600;
}
div.pager_block div.list {
    display:inline-block;
    float:right;
}
div.pager_block div.list p {
    float:left;
    margin:0;
    padding:3px 0 0;
    vertical-align:middle;
}
div.pager_block div.list ul {
    float:left;
    margin:0 7px;
    vertical-align:middle;
    list-style-type:none;
}
div.pager_block div.list ul li {
    color:#FF0000;
    display:inline;
    font-size:111%;
    font-weight:bold;
}
-->
</style>
<script type="text/javascript">
    $(function() {
        $('.pager').click(function() {
            $("input[name='page']").val($(this).attr('name'));
            $('#PagerForm').submit();
        });
    });
</script>
{/literal}

<form id="PagerForm" method="post" action="{$action}">
{$hiddenTag}
<input type="hidden" name="page" value="">
</form>

<div class="pager_block">
<p class="txt">結果：<span>{$total_count}</span>件中{$start_cnt}～{$end_cnt}件を表示しています</p>
<div class="list">
<p>
{if $prev != ''}
<a class="pager" name="{$prev}" href="#"><img height="14" width="14" alt="前の20件へ" src="{$apm.baseurl}sample/common/images/bt_back.gif"></a>
{/if}
</p>
<ul>
{section name=cnt start=$start_page loop=$end_page+1}
    {if $smarty.section.cnt.index == $curpage}
        <li>{$smarty.section.cnt.index}</li>
    {else}
        <li><a class="pager" name="{$smarty.section.cnt.index}" href="{$smarty.server.SCRIPT_NAME}">{$smarty.section.cnt.index}</a></li>
    {/if}
{/section}
</ul>
<p>
{if $next != ''}
<a class="pager" name="{$next}" href="#"><img height="14" width="14" alt="次の20件へ" src="{$apm.baseurl}sample/common/images/bt_next.gif"></a>
{/if}
</p>
</div>
